#!/bin/sh

shelldir="`dirname $0`"
export PATH="${shelldir}:$PATH"

killServer=0
while test -n "$1";
do
	case "$1" in
		--[kK][iI][Ll][Ll]|-[kK][iI][Ll][Ll])
		killServer=1;
		;;
		*) ;;
	esac
	shift;
done

test "$killServer" = "1" && { adb kill-server &>/dev/null; sleep 1; adb start-server &>/dev/null; sleep 3;}
for ss in `adb devices|grep '[[:space:]]\+device$' | awk '{print $1}'`
do
echo ["$ss"]
##adb  -s "$ss" shell cat /system/build.prop|grep -E 'brand=|model=|release='
for n in ro.product.model ro.product.name ro.build.version.release ro.product.brand
do
	echo $n=`adb  -s "$ss" shell getprop $n`
done
echo ""
done
